//package com.plian.system.controller.fr.evaluation;
//
//
//import com.plian.Tools.Func;
//import com.plian.Tools.StringPool;
//import com.plian.Tools.pagedata.PageData;
//import com.plian.system.entity.fr.evaluation.ApprovalUnit;
//import com.plian.system.model.ListResult;
//import com.plian.system.model.R;
//import com.plian.system.mybatis.support.Query;
//import com.plian.system.service.fr.evaluation.IApprovalUnitService;
//import com.plian.system.vo.fr.evaluation.ApprovalUnitVO;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lombok.RequiredArgsConstructor;
//import org.apache.commons.lang3.StringUtils;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.List;
//
///**
// * <p>
// * 核准管理单位库 前端控制器
// * </p>
// *
// * @author hu song
// * @since 2023-03-22 20:40:09
// */
//@RestController
//@RequestMapping("/api/approvalUnit")
//@Api(tags = "核准管理单位库控制器")
//@RequiredArgsConstructor
//public class ApprovalUnitController {
//
//    private final IApprovalUnitService approvalUnitService;
//
//    @ApiOperation("分页查询")
//    @PostMapping("/list")
//    public ListResult<ApprovalUnitVO> list(@RequestBody Query query) {
//        return approvalUnitService.findAll(query);
//    }
//
//    @ApiOperation("详情")
//    @PostMapping("/detail")
//    public R<ApprovalUnitVO> detail(@RequestBody ApprovalUnit approvalUnit) {
//        return R.data(approvalUnitService.detail(approvalUnit));
//    }
//
//    @ApiOperation(value = "新增或修改")
//    @PostMapping("/submit")
//    public R submit(@Validated @RequestBody ApprovalUnit approvalUnit) {
//        return approvalUnitService.saveOrUpdate(approvalUnit) ? R.data(approvalUnit) : R.fail();
//    }
//
//    @ApiOperation(value = "批量删除")
//    @PostMapping("/remove")
//    public R remove(@RequestBody PageData pd) {
//        List<String> ids = (List<String>) pd.get("ids");
//        return approvalUnitService.deleteLogic(Func.toLongList(StringUtils.join(ids, StringPool.COMMA))) ? R.success() : R.fail();
//    }
//
//}
//
